<?php
use app\common\services\UrlServices;

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=750">
    <title>九洲口令，红包百应</title>
    <script type="text/javascript" src="<?=UrlServices::buildWWWUrl('/hongbao/js/vie.js')?>"></script>
    <link rel="stylesheet" href="<?=UrlServices::buildWWWUrl('/hongbao/css/common.css')?>">
    <link rel="stylesheet" href="<?=UrlServices::buildWWWUrl('/hongbao/css/index.css')?>">
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script>
        <?=$js_info?>
    </script>
    <script src="<?=UrlServices::buildWWWUrl('/js/common.js')?>"></script>
</head>
<body>
<div class="loading">
    <img src="<?=UrlServices::buildWWWUrl('/hongbao/images/loading.gif')?>" alt="">
</div>
<div class="container">
    <img src="<?=UrlServices::buildWWWUrl('/hongbao/images/index-head.png')?>" class="bounceIn" alt="">
    <a class="link myprize" href="<?=UrlServices::buildMUrl('/activity/prize-list')?>"></a>
    <a class="link rule" href="javascript:;"></a>
    <p class="time">
        <span>自3月8日女王节起<br>3月的每个周末早10点-晚10点参与活动</span><br>
        九洲新世界海量红包和好礼相送<br>魔性口令，笑点十足快来参与吧<br>
        <span style="color: #ffd213;font-size: 29px;">转发活动至微信朋友圈<br>还可获得一次额外中奖机会喔</span>
    </p>
    <a href="javascript:;" class="start"></a>
</div>

<div class="boom">
    <div class="rule-content">
        <img src="<?=UrlServices::buildWWWUrl('/hongbao/images/rule-head.png')?>" class="rule-head" alt="">
        <i class="close"></i>
        <div class="rule">
            <h3>活动规则</h3>
            <div class="rule-container">
                <p class="title">参与方式：</p>
                <p class="content">
                    1.关注九洲新世界广场微信公众号（搜索昵称“九洲新世界广场”或微信号“jzxsj0926”），后台回复关键词“口令红包”参与活动。<br>
                    2.活动期间，每个用户仅限中奖1次；将活动转发至微信朋友圈，可增加1次中奖机会。
                </p>
                <p class="title">活动时间：</p>
                <p class="content">
                    3月8日、3月10日-11日、3月17日-18日、3月24日-25日、3月31日-4月1日，每天10:00-22:00参与活动。
                </p>
                <p class="title">参与步骤：</p>
                <p class="content">
                    1.请耐心等待口令露出，按住语音录入按钮以标准普通话读出口令文字；<br>
                    2.后台通过对您的语音准确性判断，达到合格后随即派奖，100%中奖。
                </p>
                <p class="title">礼品领取：</p>
                <p class="content">
                    1.微信红包请在微信零钱包中查收；<br>
                    2.实物礼品请至九洲新世界服务台核销领取；<br>
                    3.电子礼券请至商家核销领取。
                </p>
            </div>
        </div>
    </div>
</div>
<audio src="<?=UrlServices::buildWWWUrl('/hongbao/images/bg.mp3')?>" id="bgMusic" loop></audio>
<img id="music" src="<?=UrlServices::buildWWWUrl('/hongbao/images/music_play.png')?>">

<script src="<?=UrlServices::buildWWWUrl('/hongbao/js/jquery.min.js')?>"></script>
<script src="<?=UrlServices::buildWWWUrl('/hongbao/js/preload.jquery.js')?>"></script>
<script>
    $('.start').click(function(){
       $.ajax({
           url:'/weixin/activity/check-prize',
           type:'GET',
           dataType:'json',
           data:{},
           success:function(res){
               if(res.code == 200){
                   window.location.href = '/weixin/activity/screen';
               }else{
                   alert(res.msg);
               }
           }
       })
    });

</script>
<script>
    $(".rule").click(function(){
        $(".boom").fadeIn();
    })

    $(".close").click(function(){
        $(".boom").fadeOut();
    })

    $("#music").on("click", function() {
        if (bgMusic.paused) {
            bgMusic.play();
            $("#music").removeClass("paused");
            $("#music").attr("src", "<?=UrlServices::buildWWWUrl('/hongbao/images/music_play.png')?>");
        } else {
            bgMusic.pause();
            $("#music").addClass("paused");
            $("#music").attr("src", "<?=UrlServices::buildWWWUrl('/hongbao/images/music_paused.png')?>");
        }
    });

    // 微信自动播放
    function audioAutoPlay() {
        bgMusic.play();
        document.addEventListener("WeixinJSBridgeReady", function() {
            bgMusic.play();
        }, false);
    }

    audioAutoPlay();

    var imgs = ["<?=UrlServices::buildWWWUrl('/hongbao/images/loading.gif')?>","<?=UrlServices::buildWWWUrl('/hongbao/images/rule-head.png')?>","<?=UrlServices::buildWWWUrl('/hongbao/images/index-bg.jpg')?>","<?=UrlServices::buildWWWUrl('/hongbao/images/index-head.png')?>"]

    $.preload(imgs, {
        all: function() {
            setTimeout(function(){
                $(".loading").hide();
            },3000)
        }
    })
</script>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?2ef927ecfd39f20e7cccc0f212fc5166";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>


</body>
</html>
